package com.example.service.impl;

import com.example.dao.HistoryDao;
import com.example.entity.History;
import com.example.entity.ShopCar;
import com.example.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HistoryServiceImpl implements HistoryService {
    @Autowired
    HistoryDao historyDao;
    @Override
    public boolean add(History history) {
        return historyDao.add(history)>0;
    }

    @Override
    public List<History> FindHistoryByUid(int uid) {
        return historyDao.FindHistoryByUid(uid);
    }


    @Override
    public boolean remove(int hid) {
        return historyDao.remove(hid)>0;
    }
}
